<!--
 * @Description: 推进记录
 * 
 * @Author: XiongYaoYuan<xiongyaoyuan>
 * @Date: 2023-08-11 14:53:48
 * @FilePath: /yuxiuproweb/src/views/mes/pro/workorder/advance/log.vue
-->
<template>
  <el-dialog
    :close-on-click-modal="false"
    v-dialogDrag
    title="推进记录"
    :visible.sync="shows"
    width="700px"
    append-to-body
  >
    <el-table :data="list">
      <el-table-column type="index" label="序号" width="60"></el-table-column>
      <el-table-column label="订单id" prop="orderId"></el-table-column>
      <el-table-column label="推送到状态" prop="state">
        <template slot-scope="{ row }">
          {{ getTypeName(dict.type.pro_order_state, row.state) }}
        </template>
      </el-table-column>
      <el-table-column label="推送人" prop="pushPerson"></el-table-column>
      <el-table-column label="推送时间" prop="pushTime"></el-table-column>
    </el-table>
    <span slot="footer" class="dialog-footer">
      <el-button @click="shows = false">取 消</el-button>
    </span>
  </el-dialog>
</template>

<script>
import { listOrderProgressPushRecord } from "@/api/asc/order";
export default {
  dicts: ["pro_order_state"],
  props: {
    show: Boolean,
    data: {
      type: Object,
    },
  },
  data() {
    return {
      list: [],
    };
  },
  computed: {
    shows: {
      get() {
        return this.show;
      },
      set(newValue) {
        this.$emit("update:show", newValue);
      },
    },
  },
  created() {
    this.getOrderProgressPushRecordList();
  },
  methods: {
    getOrderProgressPushRecordList() {
      listOrderProgressPushRecord({
        orderId: this.data.proOrderId,
        pageNum: 1,
        pageSize: 100,
      }).then(({ rows }) => {
        this.list = rows || [];
      });
    },
  },
};
</script>
